<admintpl file="header"/>
<body class="J_scroll_fixed">
<div class="wrap jj">
  <ul class="nav nav-tabs">
     <li><a href="{:U('menu/index')}">后台菜单</a></li>
     <li><a href="{:U('menu/add')}">添加菜单</a></li>
  </ul>
  <div class="common-form">
    <form method="post" class="form-horizontal J_ajaxForm" action="{:U('Menu/edit_post')}">
      <div class="table_list">
        <table cellpadding="2" cellspacing="2" class="table_form" width="100%">
          <tbody>
            <tr>
              <td width="180">上级:</td>
              <td><select name="parentid" class="normal_select">
                  <option value="0">作为一级菜单</option>
                     {$select_categorys}
                </select></td>
            </tr>
            <tr>
              <td>名称:</td>
              <td><input type="text" class="input" name="name" value="{$data.name}"><span class="must_red">*</span></td>
            </tr>
            <tr>
              <td>应用:</td>
              <td><input type="text" class="input" name="app" id="app" value="{$data.app}"><span class="must_red">*</span></td>
            </tr>
            <tr>
              <td>模块:</td>
              <td><input type="text" class="input" name="model" id="model" value="{$data.model}"><span class="must_red">*</span></td>
            </tr>
            <tr>
              <td>方法:</td>
              <td><input type="text" class="input" name="action" id="action" value="{$data.action}"><span class="must_red">*</span></td>
            </tr>
            <tr>
              <td>参数:</td>
              <td><input type="text" class="input length_5" name="data" value="{$data.data}">
                例:id=3&amp;p=3</td>
            </tr>
            <tr>
              <td>图标:</td>
              <td><input type="text" class="input" name="icon" id="action" value="{$data.icon}"></td>
            </tr>
            <tr>
              <td>备注:</td>
              <td><textarea name="remark" rows="5" cols="57">{$data.remark}</textarea></td>
            </tr>
            <tr>
              <td>状态:</td>
              <td><select name="status" class="normal_select">
                  <option value="1" <eq name="data.status" value="1">selected</eq>>显示</option>
                  <option value="0" <eq name="data.status" value="0">selected</eq>>隐藏</option>
                </select></td>
            </tr>
            <tr>
              <td>类型:</td>
              <td><select name="type" class="normal_select">
                  <option value="1" <eq name="data.type" value="1">selected</eq>>权限认证+菜单</option>
                   <option value="0" <eq name="data.type" value="0">selected</eq>>只作为菜单</option>
                </select>
                注意：“权限认证+菜单”表示加入后台权限管理，纯碎是菜单项请不要选择此项。</td>
            </tr>
          </tbody>
        </table>
      </div>
       <input type="hidden" name="id" value="{$data.id}" />
      <div class="form-actions">
        <button type="submit" class="btn btn-primary btn_submit  J_ajax_submit_btn">更新</button>
        <button class="btn J_ajax_close_btn"type="submit">关闭</button>
      </div>
    </form>
  </div>
</div>
<script src="__ROOT__/statics/js/common.js"></script>
<script>
	$(function(){
		$(".J_ajax_close_btn").on('click', function (e){
		    e.preventDefault();
		    Wind.use("artDialog", function () {
		        art.dialog({
		            id: "question",
		            icon: "question",
		            fixed: true,
		            lock: true,
		            background: "#CCCCCC",
		            opacity: 0,
		            content: "您确定需要关闭当前页面嘛？",
		            ok:function(){
		            	setCookie('refersh_time_admin_menu_index',1);
						window.close();
						return true;
					}
		        });
		    });
		});
	});

</script>
</body>
</html>